/**
 * 总控台  工单列表，底部统计数
 */

const sumtitle = require('../module/sumtitle.js')
module.exports = {
    //统计工单数
    sumorder: (req, res, next) => {
        sumtitle.sumorder().then(results => {
            req.ors = results.ors
            next()
        }).catch(err => {
            next(err)
        })
    },

    //统计完工数
    sumendorder: (req, res, next) => {
        sumtitle.sumendorder().then(resus => {
            req.ends = resus.ends
            next()
        }).catch(err => {
            next(err)
        })
    },

    //统计已支付数
    sumorpay: (req, res, next) => {
        sumtitle.sumorpay().then(resuls => {
            req.pas = resuls.pas
            next()
        }).catch(err => {
            next(err)
        })
    }


}